package net.zjitc.controller.admin;

import net.zjitc.pojo.Orders;
import net.zjitc.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
@RequestMapping(value = "/admin")
public class adminOrder {
    @Autowired
    OrderService orderService;


    @RequestMapping(value = "/order_list")
    public String movie_list(Model model){
        List<Orders>orderList = orderService.findAll();
        model.addAttribute("order",orderList);
        return "/admin/order_list";
    }
}
